#pragma once

#include <MyFC/Widget.h>

namespace My {

class Button : public virtual Control {
protected:
	enum State {
		Neutral,
		Hover,
		Down,
	};
private:
	State	m_State;
	bool	m_Hover;
	bool	m_Pressed;
protected:
	void UpdateState();
	State GetState() const
		{ return m_State; }
	void SetState(State s);
public:
	Button();
public:
	virtual void HandleClick() { }
public:
	virtual void HandleLeftDoubleClick(unsigned int flags, const CPoint & p);
	virtual void HandleLeftDown(unsigned int flags, const CPoint & p);
	virtual void HandleLeftUp(unsigned int flags, const CPoint & p);
	virtual void HandleMouseMove(unsigned int flags, const CPoint & p);
};

} // My
